package cn.edu.nchu.comic_strip.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.io.Serializable;

/**
 * @className: Book
 * @description: 连环画实体类
 * @author: Kuangkeli
 * @date: 2024/05/24 15:14
 **/

@Entity(tableName = "book")
public class Book implements Serializable {

    /**
     * 连环画编号
     */
    @PrimaryKey(autoGenerate = true)
    private int id;

    /**
     * 书名
     */
    @ColumnInfo(name = "book_name")
    private String bookName;

    /**
     * 连环画封面图片编号
     */
    @ColumnInfo(name = "book_cover_id")
    private String bookCover;

    @ColumnInfo(name = "book_intro")
    private String intro;

    public Book(int id, String bookName, String bookCover, String intro) {
        this.id = id;
        this.bookName = bookName;
        this.bookCover = bookCover;
        this.intro = intro;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getBookCover() {
        return bookCover;
    }

    public void setBookCover(String bookCover) {
        this.bookCover = bookCover;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", bookName='" + bookName + '\'' +
                ", bookCover='" + bookCover + '\'' +
                ", intro='" + intro + '\'' +
                '}';
    }
}
